﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using TarreOA.TarreOADAL;
using System.Data.SqlClient;
public partial class page_post_tel_overseas : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //首先得到用户权限 
        
        if (!IsPostBack)
        {
            string pro = Request.QueryString["pro"];
            //
            

            GVPostTel.DataSource = this.getDataSet(pro);
            //        GridView1.DataKeyNames = new string[] { "id" };
            GVPostTel.DataBind();
        }
    }
    protected DataSet getDataSet(string pro)
    {

        SqlConnection conn = SQLManager.GetConn();
        SqlDataAdapter myda = new SqlDataAdapter("SELECT Area, Post_No,Tel_No FROM post_tel where province='" + pro + "'", conn);
        DataSet myds = new DataSet();
        myda.Fill(myds, "lis");
        conn.Close();
        return myds;

    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        Response.Redirect("./PostTelMain.aspx");
    }
}
